package com.coffee.sku.api.inquire.result;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.Lists;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class InquireSkuContentResult implements Serializable {
    private static final long serialVersionUID = -1L;
    @JsonProperty("inquireSkuContentId")
    private Integer id;
    private Integer skuId;
    private String title;
    private String subtitle;
    private String skuType;
    private Integer supplierId;
    private String supplierName;
    private String businessName;
    private Integer categoryId;
    private String categoryName;
    private List<Integer> categoryIds;
    private List<String> categoryNames;
    private String pidPath;
    private String cover;
    private String subCover;
    private String details;
    private String goodsAttribute;
    private String otherAttribute;
    private String logistics;
    private Date createTime;
    private Integer sampleCount;
    private String sampleLogistics;
    private String sampleUnit;
    private String isDisable;
    private String isEnable;
    private String disableReason;
    private String level;
    private String isApprove;
    private String approveRefuseReason;
    private String originPrice;
    private InquireSalesInformationResult inquireSalesInformationResult;
    private List<InquireSkuTestingMessageResult> inquireSkuTestingMessageResults;
    private Integer status;

    public Integer getStatus() {
        if ("W".equals(this.isApprove)) {
            this.status = 0;
        } else if ("N".equals(this.isApprove)) {
            this.status = 1;
        } else if ("N".equals(this.isEnable)) {
            this.status = 3;
        } else if ("Y".equals(this.isEnable)) {
            this.status = 4;
        }
        return status;
    }

}

